#include "comm.hpp"
#include <unistd.h>
#include "ser.hpp"
int main()
{
    int index = 0;

    Share_Mem sm(default_path, proj_id, USER);

    File_operate fifo(".", SER_FIFO);
    fifo.Open_for_Write();

    fifo.Write();

    sm.Attch();
    char *shm = (char *)sm.Virtual_address();
    // sm.Size();
    for (char c = 'A'; c <= 'Z'; c++, index += 2)
    {
        shm[index] = c;
        sleep(1);
        shm[index + 1] = c;
        // 通知服务器端
        fifo.Write();
          sleep(1);
    }
    fifo.Close();
    return 0;
}